  <aside class="main-sidebar sidebar-wrapper">
    <section class="sidebar" id="sidebar">
      <!-- Sidebar user panel -->
      <div class="user-panel">
        <div class="pull-left image">
         <a href="{:url('user/User/profile',['uid'=>$current_user['uid']])}" class="opentab" tab-name="navtab-collapse-profile" data-selftabhtml="个人资料"><img src="{$current_user.avatar|root_full_path|default='/static/assets/img/default-avatar.svg'}" class="img-circle" style="width: 100%;max-width: 45px;height: auto;" alt=""></a>
        </div>
        <div class="pull-left info">
          <p><a href="{:url('user/User/profile',['uid'=>$current_user['uid']])}" class="opentab" tab-title='个人资料' tab-name="navtab-collapse-profile">{$current_user.nickname}</a></p>
          <i class="fa fa-circle text-success"></i> [<span class="loginout f12">退出</span>]
        </div>
      </div>
      <ul class="sidebar-menu" id="sidebar-menus">
       
      </ul>
    </section>
  </aside>

  <script id="sidebar_menus" type="text/html">
    <li class="header">MAIN NAVIGATION</li>
    <% for (var i = 0; i < data.length; i ++) { %>
        <% var vo = data[i]; %>
        <% var child = data[i]._child; %>
        <li class="<% if(child){ %> treeview <% }else{ %>no_tree<% } %>">
          <a href="<% if(child){ %>#<% }else{ %> <%=vo.url %> <% } %>" <% if(!child){ %> class="opentab" tab-name="navtab-collapse-<%=vo.id %>" <% } %> >
              <i class="fa <% if(vo.icon){ %> {{vo.icon}} <% }else{ %>fa-circle-o <% } %>"></i>
                <span>{{vo.title}}</span>
                <% if(child){ %><i class="fa fa-angle-left pull-right"></i> <% } %>
            </a>
          <% if(child){ %>
          <ul class="treeview-menu">
            <% for (var j = 0; j < child.length; j ++) { %>
                <% var v = child[j]; %>
                <% var _child = child[j]._child; %>
                <% if(!_child){ %>
                  <li ><a href="{{v.url}}" class="opentab" tab-name="navtab-collapse-<%=v.id %>"><i class="fa <% if(v.icon){ %> {{v.icon}} <% }else{ %>fa-circle-o <% } %>"></i> <%=v.title %></a> </li>
                  <% }else{ %>
                   <li ><a href="{{v.url}}" class="opentab" tab-name="navtab-collapse-<%=v.id %>"><i class="fa <% if(v.icon){ %> {{v.icon}} <% }else{ %>fa-circle-o <% } %>"></i> <%=v.title %> <i class="fa fa-angle-left pull-right"></i></a>
                     <ul class="treeview-menu">
                        <% for (var k = 0; k < _child.length; k ++) { %>
                            <% var _v = child[j]; %>
                            <li><a href="{{_v.url}}" class="opentab" tab-name="navtab-collapse-<%=v.id %>"><i class="fa f<% if(_v.icon){ %> {{_v.icon}} <% }else{ %>fa-circle-o <% } %>"></i> <%=_v.title %></a></li>
                        <% } %>
              
                   </ul>
                    </li>
                <% } %>
            <% } %>             
         </ul>
         <% } %>
      </li>
    <% } %>
    <li class="header">LABELS</li>
    <li><a href="https://forum.eacoophp.com" target="_blank"><i class="fa fa-circle-o text-red"></i> <span>交流社区</span></a></li>
    <li><a href="https://www.kancloud.cn/youpzt/eacoo" target="_blank"><i class="fa fa-circle-o text-yellow"></i> <span>开发文档</span></a></li>
    <li><a href="#"><i class="fa fa-circle-o text-aqua"></i> <span>联系我们</span></a></li>

    <% if (data.length==0) { %>
        <div class="no-data-div">
          <div class="no-data-icon">
            <i class="iconfont">&#xe612;</i>
          </div>
          <dl>
            <dt>暂无菜单</dt>
            <dd>数据出错</dd>
          </dl>
          
        </div>
    <% } %>
</script>
